<?php
class Pager
{
    protected $currPage = 1;
    protected $pageUrl = '?page={page}';
    protected $totalNumber = 0;
    protected $pageSize = 15;
    protected $totalPage = 0;
    protected $listLeft = 4; //列表的左偏移量
    protected $listRight = 5; //列表的右偏移量

    protected $options = array(
        'currPage' => 1, //当前页码
        'pageUrl' => '?page={page}', // 分页地址
        'totalNumber' => '100', //总记录数
        'pageSize' => 15, //每页条数
        'listLeft' => 4, //列表的左偏移量
        'listRight' => 5, //列表的右偏移量
    );

	public function __construct($options = array()) {
        $this->init();
    }

    public function setOptions($options = array()) {
        if(!$options) return ;
        $this->options = array_merge($this->options, $options);
        $this->init();
    }

    public function getOptions() {
        //
    }

    protected function init() {

    }

    public function getPager() {
        //
    }
}
?>